from typing import List

class ParamModel(object):
    def __init__(self, _type, name):
        self.type = _type
        self.name = name


    def __str__(self):
        return self.name


class UseFuncModel(object):
    def __init__(self, name, params):
        self.name = name
        self.params:List[ParamModel] = params

    def __str__(self):
        return self.name


class FuncModel(object):
    def __init__(self, name, **kwargs):
        self.name = name
        self.type = kwargs.get("type", "")
        self.code = kwargs.get("code", "")
        self.funcs:List[UseFuncModel] = kwargs.get("funcs", [])
        self.params:list[ParamModel] = kwargs.get("params", [])

    def __str__(self):
        return self.name


class CModel(object):
    def __init__(self, **kwargs):
        self.path = kwargs.get("path", "")
        self.incs = kwargs.get("incs", [])
        self.funcs:List[FuncModel] = kwargs.get("funcs", [])

    def __str__(self):
        return "\n".join([func.name  for func in self.funcs])
